package com.geovoice;


 import org.osmdroid.util.GeoPoint;

import android.location.Location;

/*    This file is part of Geovoice.

Geovoice is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

Geovoice is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with Geovoice.  If not, see <http://www.gnu.org/licenses/>.  */

/**
 * The Class LPEPref. Location Phone Enabled Preference
 */
public class LPEPref {
	
	/** The location. */
	protected  String location;
	
	/** The phone string. */
	protected  String phoneString;
	
	/** The radius. */
	protected int radius = 100;
	
	/** The enable pref. */
	protected  int enablePref = 0;
	
	
	protected int latitude = -1;
	protected int longitude = -1;
	
	/**
	 * Instantiates a new lPE pref.
	 *
	 * @param location the location
	 * @param phoneString the phone string
	 * @param radius the radius
	 * @param enablePref the enable pref
	 */
	public LPEPref(String location, String phoneString,int radius, int enablePref, int lat, int lon){
		this.location = location;
		this.phoneString = phoneString;
		this.enablePref = enablePref;
		this.radius = radius;
		this.latitude = lat;
		this.longitude = lon;
	}
	
	
	public GeoPoint getGeoPoint(){
//	  Location loc=null;
//	  double latitude = (double)Math.round(loc.getLatitude()* 100000) / 100000; 
//	  double longitude = (double)Math.round(loc.getLongitude()* 100000) / 100000;
		GeoPoint point = new GeoPoint(latitude, longitude);
		return point;
	}
	
	
	/**
	 * Sets the enable preference.
	 *
	 * @param enablePref the new enable preference
	 */
	public void setEnablePreference(int enablePref){
		this.enablePref = enablePref;
	}

	
	/**
	 * Sets the radius.
	 *
	 * @param enablePref the new radius
	 */
	public void setRadius(int enablePref){
		this.radius = radius;
	}


	
	
}
